local class = reload("class")
local super = reload("object.super")

---@class player:objsuper
local this = class(super)

function this:ctor(info)
    super.ctor(self, info)
    self:clear()
end

function this:clear()
    ---关联npc事件
    self._taskNpcMap = {}
end

function this:taskNpc(npc)
    local nid = npc:npcId()
    local tid = self._taskNpcMap[nid]
    return tid
end

function this:click(npc)
    self._npc = npc
    local tid = self:taskNpc(npc)
    if tid then
        npc:talkStart(self, tid)
    else
        npc:taskStart(self)
    end
end


return this
